home *** CD-ROM | disk | FTP | other *** search
/ Amiga Plus 2004 #11 / Amiga Plus CD - 2004 - No. 11.iso / AmiSoft / Comm / www / tidy_os4.lha / tidy / src / attrs.h < prev    next >
C/C++ Source or Header  |  2004-07-25  |  20KB  |  436 lines

  1. #ifndef __ATTRS_H__
  2. #define __ATTRS_H__
  3.  
  4. /* attrs.h -- recognize HTML attributes
  5.  
  6.   (c) 1998-2003 (W3C) MIT, ERCIM, Keio University
  7.   See tidy.h for the copyright notice.
  8.   
  9.   CVS Info :
  10.  
  11.     $Author: hoehrmann $ 
  12.     $Date: 2004/06/20 22:11:05 $ 
  13.     $Revision: 1.14 $ 
  14.  
  15. */
  16.  
  17. #include "forward.h"
  18.  
  19. /* declaration for methods that check attribute values */
  20. typedef void (AttrCheck)(TidyDocImpl* doc, Node *node, AttVal *attval);
  21.  
  22. struct _Attribute
  23. {
  24.     TidyAttrId  id;
  25.     tmbstr      name;
  26.     unsigned    versions;
  27.     AttrCheck*  attrchk;
  28.  
  29.     struct _Attribute* next;
  30. };
  31.  
  32.  
  33. /*
  34.  Anchor/Node linked list
  35. */
  36.  
  37. struct _Anchor
  38. {
  39.     struct _Anchor *next;
  40.     Node *node;
  41.     char *name;
  42. };
  43.  
  44. typedef struct _Anchor Anchor;
  45.  
  46. #ifdef ATTRIBUTE_HASH_LOOKUP
  47. #define ATTRIBUTE_HASH_SIZE 178
  48. #endif
  49.  
  50. struct _TidyAttribImpl
  51. {
  52.     /* anchor/node lookup */
  53.     Anchor*    anchor_list;
  54.  
  55.     /* Declared literal attributes */
  56.     Attribute* declared_attr_list;
  57.  
  58. #ifdef ATTRIBUTE_HASH_LOOKUP
  59.     Attribute* hashtab[ATTRIBUTE_HASH_SIZE];
  60. #endif
  61. };
  62.  
  63. typedef struct _TidyAttribImpl TidyAttribImpl;
  64.  
  65. #define XHTML_NAMESPACE "http://www.w3.org/1999/xhtml"
  66.  
  67.  
  68. /*
  69.  Bind attribute types to procedures to check values.
  70.  You can add new procedures for better validation
  71.  and each procedure has access to the node in which
  72.  the attribute occurred as well as the attribute name
  73.  and its value.
  74.  
  75.  By default, attributes are checked without regard
  76.  to the element they are found on. You have the choice
  77.  of making the procedure test which element is involved
  78.  or in writing methods for each element which controls
  79.  exactly how the attributes of that element are checked.
  80.  This latter approach is best for detecting the absence
  81.  of required attributes.
  82. */
  83.  
  84. AttrCheck CheckUrl;
  85. AttrCheck CheckScript;
  86. AttrCheck CheckName;
  87. AttrCheck CheckId;
  88. AttrCheck CheckAlign;
  89. AttrCheck CheckValign;
  90. AttrCheck CheckBool;
  91. AttrCheck CheckLength;
  92. AttrCheck CheckTarget;
  93. AttrCheck CheckFsubmit;
  94. AttrCheck CheckClear;
  95. AttrCheck CheckShape;
  96. AttrCheck CheckNumber;
  97. AttrCheck CheckScope;
  98. AttrCheck CheckColor;
  99. AttrCheck CheckVType;
  100. AttrCheck CheckScroll;
  101. AttrCheck CheckTextDir;
  102. AttrCheck CheckLang;
  103.  
  104. #define PCDATA      NULL
  105. #define CHARSET     NULL
  106. #define TYPE        NULL
  107. #define CHARACTER   NULL
  108. #define URLS        NULL
  109. #define URL         CheckUrl
  110. #define SCRIPT      CheckScript
  111. #define ALIGN       CheckAlign
  112. #define VALIGN      CheckValign
  113. #define COLOR       CheckColor
  114. #define CLEAR       CheckClear
  115. #define BORDER      CheckBool     /* kludge */
  116. #define LANG        CheckLang
  117. #define BOOL        CheckBool
  118. #define COLS        NULL
  119. #define NUMBER      CheckNumber
  120. #define LENGTH      CheckLength
  121. #define COORDS      NULL
  122. #define DATE        NULL
  123. #define TEXTDIR     CheckTextDir
  124. #define IDREFS      NULL
  125. #define IDREF       NULL
  126. #define IDDEF       CheckId
  127. #define NAME        CheckName
  128. #define TFRAME      NULL
  129. #define FBORDER     NULL
  130. #define MEDIA       NULL
  131. #define FSUBMIT     CheckFsubmit
  132. #define LINKTYPES   NULL
  133. #define TRULES      NULL
  134. #define SCOPE       CheckScope
  135. #define SHAPE       CheckShape
  136. #define SCROLL      CheckScroll
  137. #define TARGET      CheckTarget
  138. #define VTYPE       CheckVType
  139.  
  140.  
  141. /* public method for finding attribute definition by name */
  142. const Attribute* CheckAttribute( TidyDocImpl* doc, Node *node, AttVal *attval );
  143.  
  144. const Attribute* FindAttribute( TidyDocImpl* doc, AttVal *attval );
  145.  
  146. AttVal* GetAttrByName( Node *node, ctmbstr name );
  147.  
  148. AttVal* AddAttribute( TidyDocImpl* doc,
  149.                       Node *node, ctmbstr name, ctmbstr value );
  150.  
  151. AttVal* RepairAttrValue(TidyDocImpl* doc, Node* node, ctmbstr name, ctmbstr value);
  152.  
  153. Bool IsUrl( TidyDocImpl* doc, ctmbstr attrname );
  154.  
  155. Bool IsBool( TidyDocImpl* doc, ctmbstr attrname );
  156.  
  157. Bool IsScript( TidyDocImpl* doc, ctmbstr attrname );
  158.  
  159. /* may id or name serve as anchor? */
  160. Bool IsAnchorElement( TidyDocImpl* doc, Node* node );
  161.  
  162. /*
  163.   In CSS1, selectors can contain only the characters A-Z, 0-9, and
  164.   Unicode characters 161-255, plus dash (-); they cannot start with
  165.   a dash or a digit; they can also contain escaped characters and any
  166.   Unicode character as a numeric code (see next item).
  167.  
  168.   The backslash followed by at most four hexadecimal digits (0..9A..F)
  169.   stands for the Unicode character with that number.
  170.  
  171.   Any character except a hexadecimal digit can be escaped to remove its
  172.   special meaning, by putting a backslash in front.
  173.  
  174.   #508936 - CSS class naming for -clean option
  175. */
  176. Bool IsCSS1Selector( ctmbstr buf );
  177.  
  178. Bool IsValidXMLID(tmbstr id);
  179.  
  180. /* removes anchor for specific node */
  181. void RemoveAnchorByNode( TidyDocImpl* doc, Node *node );
  182.  
  183. /* add new anchor to namespace */
  184. Anchor* AddAnchor( TidyDocImpl* doc, ctmbstr name, Node *node );
  185.  
  186. /* return node associated with anchor */
  187. Node* GetNodeByAnchor( TidyDocImpl* doc, ctmbstr name );
  188.  
  189. /* free all anchors */
  190. void FreeAnchors( TidyDocImpl* doc );
  191.  
  192.  
  193. /* public methods for inititializing/freeing attribute dictionary */
  194. void InitAttrs( TidyDocImpl* doc );
  195. void FreeAttrTable( TidyDocImpl* doc );
  196.  
  197. /*
  198.  the same attribute name can't be used
  199.  more than once in each element
  200. */
  201. void RepairDuplicateAttributes( TidyDocImpl* doc, Node* node );
  202.  
  203. Bool IsBoolAttribute( AttVal* attval );
  204. Bool attrIsEvent( AttVal* attval );
  205.  
  206. AttVal* AttrGetById( Node* node, TidyAttrId id );
  207.  
  208. /* 0 == TidyAttr_UNKNOWN  */
  209. #define AttrId(av) ((av) && (av)->dict ? (av)->dict->id : TidyAttr_UNKNOWN)
  210. #define AttrIsId(av, atid) ((av) && (av)->dict && ((av)->dict->id == atid))
  211.  
  212. #define AttrHasValue(attr)      ((attr) && (attr)->value)
  213. #define AttrValueIs(attr, val)  AttrMatches(attr, val)
  214. #define AttrMatches(attr, val)  (AttrHasValue(attr) && \
  215.                                  tmbstrcasecmp((attr)->value, val) == 0)
  216. #define AttrContains(attr, val) (AttrHasValue(attr) && \
  217.                                  tmbsubstr((attr)->value, val) != NULL)
  218. #define AttrVersions(attr)      ((attr) && (attr)->dict ? (attr)->dict->versions : VERS_PROPRIETARY)
  219.  
  220. #define AttrsHaveSameId(a, b) (a && b && a->dict && b->dict && a->dict->id && \
  221.                                b->dict->id && a->dict->id == b->dict->id)
  222.  
  223.  
  224.  
  225. #define attrIsABBR(av)              AttrIsId( av, TidyAttr_ABBR  )
  226. #define attrIsACCEPT(av)            AttrIsId( av, TidyAttr_ACCEPT  )
  227. #define attrIsACCEPT_CHARSET(av)    AttrIsId( av, TidyAttr_ACCEPT_CHARSET  )
  228. #define attrIsACCESSKEY(av)         AttrIsId( av, TidyAttr_ACCESSKEY  )
  229. #define attrIsACTION(av)            AttrIsId( av, TidyAttr_ACTION  )
  230. #define attrIsADD_DATE(av)          AttrIsId( av, TidyAttr_ADD_DATE  )
  231. #define attrIsALIGN(av)             AttrIsId( av, TidyAttr_ALIGN  )
  232. #define attrIsALINK(av)             AttrIsId( av, TidyAttr_ALINK  )
  233. #define attrIsALT(av)               AttrIsId( av, TidyAttr_ALT  )
  234. #define attrIsARCHIVE(av)           AttrIsId( av, TidyAttr_ARCHIVE  )
  235. #define attrIsAXIS(av)              AttrIsId( av, TidyAttr_AXIS  )
  236. #define attrIsBACKGROUND(av)        AttrIsId( av, TidyAttr_BACKGROUND  )
  237. #define attrIsBGCOLOR(av)           AttrIsId( av, TidyAttr_BGCOLOR  )
  238. #define attrIsBGPROPERTIES(av)      AttrIsId( av, TidyAttr_BGPROPERTIES  )
  239. #define attrIsBORDER(av)            AttrIsId( av, TidyAttr_BORDER  )
  240. #define attrIsBORDERCOLOR(av)       AttrIsId( av, TidyAttr_BORDERCOLOR  )
  241. #define attrIsBOTTOMMARGIN(av)      AttrIsId( av, TidyAttr_BOTTOMMARGIN  )
  242. #define attrIsCELLPADDING(av)       AttrIsId( av, TidyAttr_CELLPADDING  )
  243. #define attrIsCELLSPACING(av)       AttrIsId( av, TidyAttr_CELLSPACING  )
  244. #define attrIsCHAR(av)              AttrIsId( av, TidyAttr_CHAR  )
  245. #define attrIsCHAROFF(av)           AttrIsId( av, TidyAttr_CHAROFF  )
  246. #define attrIsCHARSET(av)           AttrIsId( av, TidyAttr_CHARSET  )
  247. #define attrIsCHECKED(av)           AttrIsId( av, TidyAttr_CHECKED  )
  248. #define attrIsCITE(av)              AttrIsId( av, TidyAttr_CITE  )
  249. #define attrIsCLASS(av)             AttrIsId( av, TidyAttr_CLASS  )
  250. #define attrIsCLASSID(av)           AttrIsId( av, TidyAttr_CLASSID  )
  251. #define attrIsCLEAR(av)             AttrIsId( av, TidyAttr_CLEAR  )
  252. #define attrIsCODE(av)              AttrIsId( av, TidyAttr_CODE  )
  253. #define attrIsCODEBASE(av)          AttrIsId( av, TidyAttr_CODEBASE  )
  254. #define attrIsCODETYPE(av)          AttrIsId( av, TidyAttr_CODETYPE  )
  255. #define attrIsCOLOR(av)             AttrIsId( av, TidyAttr_COLOR  )
  256. #define attrIsCOLS(av)              AttrIsId( av, TidyAttr_COLS  )
  257. #define attrIsCOLSPAN(av)           AttrIsId( av, TidyAttr_COLSPAN  )
  258. #define attrIsCOMPACT(av)           AttrIsId( av, TidyAttr_COMPACT  )
  259. #define attrIsCONTENT(av)           AttrIsId( av, TidyAttr_CONTENT  )
  260. #define attrIsCOORDS(av)            AttrIsId( av, TidyAttr_COORDS  )
  261. #define attrIsDATA(av)              AttrIsId( av, TidyAttr_DATA  )
  262. #define attrIsDATAFLD(av)           AttrIsId( av, TidyAttr_DATAFLD  )
  263. #define attrIsDATAFORMATAS(av)      AttrIsId( av, TidyAttr_DATAFORMATAS  )
  264. #define attrIsDATAPAGESIZE(av)      AttrIsId( av, TidyAttr_DATAPAGESIZE  )
  265. #define attrIsDATASRC(av)           AttrIsId( av, TidyAttr_DATASRC  )
  266. #define attrIsDATETIME(av)          AttrIsId( av, TidyAttr_DATETIME  )
  267. #define attrIsDECLARE(av)           AttrIsId( av, TidyAttr_DECLARE  )
  268. #define attrIsDEFER(av)             AttrIsId( av, TidyAttr_DEFER  )
  269. #define attrIsDIR(av)               AttrIsId( av, TidyAttr_DIR  )
  270. #define attrIsDISABLED(av)          AttrIsId( av, TidyAttr_DISABLED  )
  271. #define attrIsENCODING(av)          AttrIsId( av, TidyAttr_ENCODING  )
  272. #define attrIsENCTYPE(av)           AttrIsId( av, TidyAttr_ENCTYPE  )
  273. #define attrIsFACE(av)              AttrIsId( av, TidyAttr_FACE  )
  274. #define attrIsFOR(av)               AttrIsId( av, TidyAttr_FOR  )
  275. #define attrIsFRAME(av)             AttrIsId( av, TidyAttr_FRAME  )
  276. #define attrIsFRAMEBORDER(av)       AttrIsId( av, TidyAttr_FRAMEBORDER  )
  277. #define attrIsFRAMESPACING(av)      AttrIsId( av, TidyAttr_FRAMESPACING  )
  278. #define attrIsGRIDX(av)             AttrIsId( av, TidyAttr_GRIDX  )
  279. #define attrIsGRIDY(av)             AttrIsId( av, TidyAttr_GRIDY  )
  280. #define attrIsHEADERS(av)           AttrIsId( av, TidyAttr_HEADERS  )
  281. #define attrIsHEIGHT(av)            AttrIsId( av, TidyAttr_HEIGHT  )
  282. #define attrIsHREF(av)              AttrIsId( av, TidyAttr_HREF  )
  283. #define attrIsHREFLANG(av)          AttrIsId( av, TidyAttr_HREFLANG  )
  284. #define attrIsHSPACE(av)            AttrIsId( av, TidyAttr_HSPACE  )
  285. #define attrIsHTTP_EQUIV(av)        AttrIsId( av, TidyAttr_HTTP_EQUIV  )
  286. #define attrIsID(av)                AttrIsId( av, TidyAttr_ID  )
  287. #define attrIsISMAP(av)             AttrIsId( av, TidyAttr_ISMAP  )
  288. #define attrIsLABEL(av)             AttrIsId( av, TidyAttr_LABEL  )
  289. #define attrIsLANG(av)              AttrIsId( av, TidyAttr_LANG  )
  290. #define attrIsLANGUAGE(av)          AttrIsId( av, TidyAttr_LANGUAGE  )
  291. #define attrIsLAST_MODIFIED(av)     AttrIsId( av, TidyAttr_LAST_MODIFIED  )
  292. #define attrIsLAST_VISIT(av)        AttrIsId( av, TidyAttr_LAST_VISIT  )
  293. #define attrIsLEFTMARGIN(av)        AttrIsId( av, TidyAttr_LEFTMARGIN  )
  294. #define attrIsLINK(av)              AttrIsId( av, TidyAttr_LINK  )
  295. #define attrIsLONGDESC(av)          AttrIsId( av, TidyAttr_LONGDESC  )
  296. #define attrIsLOWSRC(av)            AttrIsId( av, TidyAttr_LOWSRC  )
  297. #define attrIsMARGINHEIGHT(av)      AttrIsId( av, TidyAttr_MARGINHEIGHT  )
  298. #define attrIsMARGINWIDTH(av)       AttrIsId( av, TidyAttr_MARGINWIDTH  )
  299. #define attrIsMAXLENGTH(av)         AttrIsId( av, TidyAttr_MAXLENGTH  )
  300. #define attrIsMEDIA(av)             AttrIsId( av, TidyAttr_MEDIA  )
  301. #define attrIsMETHOD(av)            AttrIsId( av, TidyAttr_METHOD  )
  302. #define attrIsMULTIPLE(av)          AttrIsId( av, TidyAttr_MULTIPLE  )
  303. #define attrIsNAME(av)              AttrIsId( av, TidyAttr_NAME  )
  304. #define attrIsNOHREF(av)            AttrIsId( av, TidyAttr_NOHREF  )
  305. #define attrIsNORESIZE(av)          AttrIsId( av, TidyAttr_NORESIZE  )
  306. #define attrIsNOSHADE(av)           AttrIsId( av, TidyAttr_NOSHADE  )
  307. #define attrIsNOWRAP(av)            AttrIsId( av, TidyAttr_NOWRAP  )
  308. #define attrIsOBJECT(av)            AttrIsId( av, TidyAttr_OBJECT  )
  309. #define attrIsOnAFTERUPDATE(av)     AttrIsId( av, TidyAttr_OnAFTERUPDATE  )
  310. #define attrIsOnBEFOREUNLOAD(av)    AttrIsId( av, TidyAttr_OnBEFOREUNLOAD  )
  311. #define attrIsOnBEFOREUPDATE(av)    AttrIsId( av, TidyAttr_OnBEFOREUPDATE  )
  312. #define attrIsOnBLUR(av)            AttrIsId( av, TidyAttr_OnBLUR  )
  313. #define attrIsOnCHANGE(av)          AttrIsId( av, TidyAttr_OnCHANGE  )
  314. #define attrIsOnCLICK(av)           AttrIsId( av, TidyAttr_OnCLICK  )
  315. #define attrIsOnDATAAVAILABLE(av)   AttrIsId( av, TidyAttr_OnDATAAVAILABLE  )
  316. #define attrIsOnDATASETCHANGED(av)  AttrIsId( av, TidyAttr_OnDATASETCHANGED  )
  317. #define attrIsOnDATASETCOMPLETE(av) AttrIsId( av, TidyAttr_OnDATASETCOMPLETE  )
  318. #define attrIsOnDBLCLICK(av)        AttrIsId( av, TidyAttr_OnDBLCLICK  )
  319. #define attrIsOnERRORUPDATE(av)     AttrIsId( av, TidyAttr_OnERRORUPDATE  )
  320. #define attrIsOnFOCUS(av)           AttrIsId( av, TidyAttr_OnFOCUS  )
  321. #define attrIsOnKEYDOWN(av)         AttrIsId( av, TidyAttr_OnKEYDOWN  )
  322. #define attrIsOnKEYPRESS(av)        AttrIsId( av, TidyAttr_OnKEYPRESS  )
  323. #define attrIsOnKEYUP(av)           AttrIsId( av, TidyAttr_OnKEYUP  )
  324. #define attrIsOnLOAD(av)            AttrIsId( av, TidyAttr_OnLOAD  )
  325. #define attrIsOnMOUSEDOWN(av)       AttrIsId( av, TidyAttr_OnMOUSEDOWN  )
  326. #define attrIsOnMOUSEMOVE(av)       AttrIsId( av, TidyAttr_OnMOUSEMOVE  )
  327. #define attrIsOnMOUSEOUT(av)        AttrIsId( av, TidyAttr_OnMOUSEOUT  )
  328. #define attrIsOnMOUSEOVER(av)       AttrIsId( av, TidyAttr_OnMOUSEOVER  )
  329. #define attrIsOnMOUSEUP(av)         AttrIsId( av, TidyAttr_OnMOUSEUP  )
  330. #define attrIsOnRESET(av)           AttrIsId( av, TidyAttr_OnRESET  )
  331. #define attrIsOnROWENTER(av)        AttrIsId( av, TidyAttr_OnROWENTER  )
  332. #define attrIsOnROWEXIT(av)         AttrIsId( av, TidyAttr_OnROWEXIT  )
  333. #define attrIsOnSELECT(av)          AttrIsId( av, TidyAttr_OnSELECT  )
  334. #define attrIsOnSUBMIT(av)          AttrIsId( av, TidyAttr_OnSUBMIT  )
  335. #define attrIsOnUNLOAD(av)          AttrIsId( av, TidyAttr_OnUNLOAD  )
  336. #define attrIsPROFILE(av)           AttrIsId( av, TidyAttr_PROFILE  )
  337. #define attrIsPROMPT(av)            AttrIsId( av, TidyAttr_PROMPT  )
  338. #define attrIsRBSPAN(av)            AttrIsId( av, TidyAttr_RBSPAN  )
  339. #define attrIsREADONLY(av)          AttrIsId( av, TidyAttr_READONLY  )
  340. #define attrIsREL(av)               AttrIsId( av, TidyAttr_REL  )
  341. #define attrIsREV(av)               AttrIsId( av, TidyAttr_REV  )
  342. #define attrIsRIGHTMARGIN(av)       AttrIsId( av, TidyAttr_RIGHTMARGIN  )
  343. #define attrIsROWS(av)              AttrIsId( av, TidyAttr_ROWS  )
  344. #define attrIsROWSPAN(av)           AttrIsId( av, TidyAttr_ROWSPAN  )
  345. #define attrIsRULES(av)             AttrIsId( av, TidyAttr_RULES  )
  346. #define attrIsSCHEME(av)            AttrIsId( av, TidyAttr_SCHEME  )
  347. #define attrIsSCOPE(av)             AttrIsId( av, TidyAttr_SCOPE  )
  348. #define attrIsSCROLLING(av)         AttrIsId( av, TidyAttr_SCROLLING  )
  349. #define attrIsSELECTED(av)          AttrIsId( av, TidyAttr_SELECTED  )
  350. #define attrIsSHAPE(av)             AttrIsId( av, TidyAttr_SHAPE  )
  351. #define attrIsSHOWGRID(av)          AttrIsId( av, TidyAttr_SHOWGRID  )
  352. #define attrIsSHOWGRIDX(av)         AttrIsId( av, TidyAttr_SHOWGRIDX  )
  353. #define attrIsSHOWGRIDY(av)         AttrIsId( av, TidyAttr_SHOWGRIDY  )
  354. #define attrIsSIZE(av)              AttrIsId( av, TidyAttr_SIZE  )
  355. #define attrIsSPAN(av)              AttrIsId( av, TidyAttr_SPAN  )
  356. #define attrIsSRC(av)               AttrIsId( av, TidyAttr_SRC  )
  357. #define attrIsSTANDBY(av)           AttrIsId( av, TidyAttr_STANDBY  )
  358. #define attrIsSTART(av)             AttrIsId( av, TidyAttr_START  )
  359. #define attrIsSTYLE(av)             AttrIsId( av, TidyAttr_STYLE  )
  360. #define attrIsSUMMARY(av)           AttrIsId( av, TidyAttr_SUMMARY  )
  361. #define attrIsTABINDEX(av)          AttrIsId( av, TidyAttr_TABINDEX  )
  362. #define attrIsTARGET(av)            AttrIsId( av, TidyAttr_TARGET  )
  363. #define attrIsTEXT(av)              AttrIsId( av, TidyAttr_TEXT  )
  364. #define attrIsTITLE(av)             AttrIsId( av, TidyAttr_TITLE  )
  365. #define attrIsTOPMARGIN(av)         AttrIsId( av, TidyAttr_TOPMARGIN  )
  366. #define attrIsTYPE(av)              AttrIsId( av, TidyAttr_TYPE  )
  367. #define attrIsUSEMAP(av)            AttrIsId( av, TidyAttr_USEMAP  )
  368. #define attrIsVALIGN(av)            AttrIsId( av, TidyAttr_VALIGN  )
  369. #define attrIsVALUE(av)             AttrIsId( av, TidyAttr_VALUE  )
  370. #define attrIsVALUETYPE(av)         AttrIsId( av, TidyAttr_VALUETYPE  )
  371. #define attrIsVERSION(av)           AttrIsId( av, TidyAttr_VERSION  )
  372. #define attrIsVLINK(av)             AttrIsId( av, TidyAttr_VLINK  )
  373. #define attrIsVSPACE(av)            AttrIsId( av, TidyAttr_VSPACE  )
  374. #define attrIsWIDTH(av)             AttrIsId( av, TidyAttr_WIDTH  )
  375. #define attrIsWRAP(av)              AttrIsId( av, TidyAttr_WRAP  )
  376. #define attrIsXMLNS(av)             AttrIsId( av, TidyAttr_XMLNS  )
  377. #define attrIsXML_LANG(av)          AttrIsId( av, TidyAttr_XML_LANG  )
  378. #define attrIsXML_SPACE(av)         AttrIsId( av, TidyAttr_XML_SPACE  )
  379.  
  380.  
  381. /* Attribute Retrieval macros
  382. */
  383. #define attrGetHREF( nod )        AttrGetById( nod, TidyAttr_HREF  )
  384. #define attrGetSRC( nod )         AttrGetById( nod, TidyAttr_SRC  )
  385. #define attrGetID( nod )          AttrGetById( nod, TidyAttr_ID  )
  386. #define attrGetNAME( nod )        AttrGetById( nod, TidyAttr_NAME  )
  387. #define attrGetSUMMARY( nod )     AttrGetById( nod, TidyAttr_SUMMARY  )
  388. #define attrGetALT( nod )         AttrGetById( nod, TidyAttr_ALT  )
  389. #define attrGetLONGDESC( nod )    AttrGetById( nod, TidyAttr_LONGDESC  )
  390. #define attrGetUSEMAP( nod )      AttrGetById( nod, TidyAttr_USEMAP  )
  391. #define attrGetISMAP( nod )       AttrGetById( nod, TidyAttr_ISMAP  )
  392. #define attrGetLANGUAGE( nod )    AttrGetById( nod, TidyAttr_LANGUAGE  )
  393. #define attrGetTYPE( nod )        AttrGetById( nod, TidyAttr_TYPE  )
  394. #define attrGetVALUE( nod )       AttrGetById( nod, TidyAttr_VALUE  )
  395. #define attrGetCONTENT( nod )     AttrGetById( nod, TidyAttr_CONTENT  )
  396. #define attrGetTITLE( nod )       AttrGetById( nod, TidyAttr_TITLE  )
  397. #define attrGetXMLNS( nod )       AttrGetById( nod, TidyAttr_XMLNS  )
  398. #define attrGetDATAFLD( nod )     AttrGetById( nod, TidyAttr_DATAFLD  )
  399. #define attrGetWIDTH( nod )       AttrGetById( nod, TidyAttr_WIDTH  )
  400. #define attrGetHEIGHT( nod )      AttrGetById( nod, TidyAttr_HEIGHT  )
  401. #define attrGetFOR( nod )         AttrGetById( nod, TidyAttr_FOR  )
  402. #define attrGetSELECTED( nod )    AttrGetById( nod, TidyAttr_SELECTED  )
  403. #define attrGetCHECKED( nod )     AttrGetById( nod, TidyAttr_CHECKED  )
  404. #define attrGetLANG( nod )        AttrGetById( nod, TidyAttr_LANG  )
  405. #define attrGetTARGET( nod )      AttrGetById( nod, TidyAttr_TARGET  )
  406. #define attrGetHTTP_EQUIV( nod )  AttrGetById( nod, TidyAttr_HTTP_EQUIV  )
  407. #define attrGetREL( nod )         AttrGetById( nod, TidyAttr_REL  )
  408.  
  409. #define attrGetOnMOUSEMOVE( nod ) AttrGetById( nod, TidyAttr_OnMOUSEMOVE  )
  410. #define attrGetOnMOUSEDOWN( nod ) AttrGetById( nod, TidyAttr_OnMOUSEDOWN  )
  411. #define attrGetOnMOUSEUP( nod )   AttrGetById( nod, TidyAttr_OnMOUSEUP  )
  412. #define attrGetOnCLICK( nod )     AttrGetById( nod, TidyAttr_OnCLICK  )
  413. #define attrGetOnMOUSEOVER( nod ) AttrGetById( nod, TidyAttr_OnMOUSEOVER  )
  414. #define attrGetOnMOUSEOUT( nod )  AttrGetById( nod, TidyAttr_OnMOUSEOUT  )
  415. #define attrGetOnKEYDOWN( nod )   AttrGetById( nod, TidyAttr_OnKEYDOWN  )
  416. #define attrGetOnKEYUP( nod )     AttrGetById( nod, TidyAttr_OnKEYUP  )
  417. #define attrGetOnKEYPRESS( nod )  AttrGetById( nod, TidyAttr_OnKEYPRESS  )
  418. #define attrGetOnFOCUS( nod )     AttrGetById( nod, TidyAttr_OnFOCUS  )
  419. #define attrGetOnBLUR( nod )      AttrGetById( nod, TidyAttr_OnBLUR  )
  420.  
  421. #define attrGetBGCOLOR( nod )     AttrGetById( nod, TidyAttr_BGCOLOR  )
  422.  
  423. #define attrGetLINK( nod )        AttrGetById( nod, TidyAttr_LINK  )
  424. #define attrGetALINK( nod )       AttrGetById( nod, TidyAttr_ALINK  )
  425. #define attrGetVLINK( nod )       AttrGetById( nod, TidyAttr_VLINK  )
  426.  
  427. #define attrGetTEXT( nod )        AttrGetById( nod, TidyAttr_TEXT  )
  428. #define attrGetSTYLE( nod )       AttrGetById( nod, TidyAttr_STYLE  )
  429. #define attrGetABBR( nod )        AttrGetById( nod, TidyAttr_ABBR  )
  430. #define attrGetCOLSPAN( nod )     AttrGetById( nod, TidyAttr_COLSPAN  )
  431. #define attrGetFONT( nod )        AttrGetById( nod, TidyAttr_FONT  )
  432. #define attrGetBASEFONT( nod )    AttrGetById( nod, TidyAttr_BASEFONT  )
  433. #define attrGetROWSPAN( nod )     AttrGetById( nod, TidyAttr_ROWSPAN  )
  434.  
  435. #endif /* __ATTRS_H__ */
  436.